<template>
  <div class="main-title">
    <div v-if="hasRouteBack" class="back" @click="routerBack">
      <i class="van-icon van-icon-arrow-left"></i>
    </div>
    <van-icon v-if="hasIcon" name="location-o" />
    {{titleName}}
    <div v-if="hasClickByFun" class="add">
      <i class="van-icon van-icon-plus"></i>
    </div>
  </div>
</template>

<script setup lang="ts">
import { ref,onMounted } from 'vue'
import { useRoute } from 'vue-router'
const route = useRoute()
const routerBack = (() => {
  history.back()
})
const titleName: any = route.meta.title
const hasRouteBack: any = route.meta.hasRouteBack
const hasClickByFun: any = route.meta.hasClickByFun
const hasIcon: any = route.meta.hasIcon

</script>